// layout
import Footer from "@/layout/footer/index.vue";
// import Header from "@/layout/header/index.vue";
const routes = [
  // {
  //   name: 'notFound',
  //   path: '/:path(.*)+',
  //   redirect: {
  //     name: 'index',
  //   },
  // },
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      isOpen: true,
    },
  },
  {    
    name: "fotterMain",
    path: "/",
    redirect: "/index",
    component: Footer,
    children: [
      {        
        name: "index",
        path: "/index",
        meta: {
          title: "首页",
          isOpen: false,
        },
        component: () => import("@/views/index/index.vue"),
      },
      {        
        name: "home",
        path: "/home",
        meta: {
          title: "我的",
        },
        component: () => import("@/views/home/index.vue"),
      },
    ],
  },
  {
    name: 'user',
    path: '/user',
    component: () => import('@/views/user/index.vue'),
    meta: {
      title: '会员中心',
    },
  },
  {
    name: 'cart',
    path: '/cart',
    component: () => import('@/views/cart/index.vue'),
    meta: {
      title: '购物车',
    },
  },
  {
    name: 'goods',
    path: '/goods',
    component: () => import('@/views/goods/index.vue'),
    meta: {
      title: '商品详情',
      isOpen: true,
    },
  },
];

export default routes;